//
//  AskLeave.m
//  SchoolTask
//
//  Created by tusm on 16/8/25.
//  Copyright © 2016年 sm. All rights reserved.
//

#import "AskLeave.h"
#define kScreenW [UIScreen mainScreen].bounds.size.width
#define kScreenH [UIScreen mainScreen].bounds.size.height

@interface AskLeave ()

@property (nonatomic,retain) UILabel  *classNameLb;    //课程


@property (nonatomic,retain) UILabel  *leave;          //早退
@property (nonatomic,retain) UILabel  *askLeave;       //请假
@property (nonatomic,retain) UILabel  *crunk;          //旷课

@property (nonatomic,retain) UILabel  *leaveVule;          //早退值
@property (nonatomic,retain) UILabel  *askLeaveVule;       //请假值
@property (nonatomic,retain) UILabel  *crunkVule;          //旷课值
@end

@implementation AskLeave

- (instancetype)init
{
    self = [super init];
    if (self) {
        
        self.frame = [UIScreen mainScreen].bounds;
        [self setLabel];
    }
    return self;
}

- (void)setLabel {
    
    _classNameLb = [[UILabel alloc]initWithFrame:CGRectMake(20, 80, 150, 50)];
    _crunk       = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW-50, 80, 25, 30)];
    _crunkVule   = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW-20, 80, 20, 30)];
    _askLeave    = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW-90, 80, 25, 30)];
    _askLeaveVule = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW-60, 80, 20, 30)];
    _leaveVule   = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW - 100, 80, 20, 30)];
    _leave       = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW - 130, 80, 25, 30)];
    
    _classNameLb.text = @"我的请假";
    _crunk.text      = @"旷课:";
    _askLeave.text   = @"请假:";
    _askLeaveVule.text = @"3";
    _crunkVule.text  = @"5";
    _leave.text      = @"早退:";
    _leaveVule.text  = @"55";
    
    //值左对其
    _crunkVule.textAlignment = 0;
    _askLeaveVule.textAlignment = 0;
    _leaveVule.textAlignment = 0;
    
    //表示符右对齐
    _crunk.textAlignment = 2;
    _askLeave.textAlignment = 2;
    _leave.textAlignment = 2;

    //加粗
    _classNameLb.font  = [UIFont boldSystemFontOfSize:25];

    _askLeaveVule.font = [UIFont systemFontOfSize:10];
    _crunk.font     = [UIFont systemFontOfSize:10];
    _askLeave.font  = [UIFont systemFontOfSize:10];
    _crunkVule.font = [UIFont systemFontOfSize:10];
    _crunk.font     = [UIFont systemFontOfSize:10];
    _leaveVule.font = [UIFont systemFontOfSize:10];
    _leave.font     = [UIFont systemFontOfSize:10];
    
    _classNameLb.textColor = [UIColor colorWithRed:250/255.0 green:140/255.0 blue:0 alpha:1];
    _crunk.textColor       = [UIColor colorWithRed:170/255.0 green:170/255.0 blue:170/255.0 alpha:1];
    _crunkVule.textColor   = [UIColor colorWithRed:170/255.0 green:170/255.0 blue:170/255.0 alpha:1];
    _askLeave.textColor     = [UIColor colorWithRed:170/255.0 green:170/255.0 blue:170/255.0 alpha:1];
    _askLeaveVule.textColor = [UIColor colorWithRed:170/255.0 green:170/255.0 blue:170/255.0 alpha:1];
    _leaveVule.textColor    = [UIColor colorWithRed:170/255.0 green:170/255.0 blue:170/255.0 alpha:1];
    _leave.textColor        = [UIColor colorWithRed:170/255.0 green:170/255.0 blue:170/255.0 alpha:1];

    [self addSubview:_classNameLb];
    [self addSubview:_crunk];
    [self addSubview:_crunkVule];
    [self addSubview:_askLeaveVule];
    [self addSubview:_askLeave];
    [self addSubview:_leave];
    [self addSubview:_leaveVule];

}

@end
